//
//  CatogryGiftTableViewCell.m
//  project
//
//  Created by lanou on 15/10/29.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "CatogryGiftTableViewCell.h"

@implementation CatogryGiftTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 60, 20)];
        _titleLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_titleLabel];
        
        _view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 5, self.frame.size.height)];
        _view.backgroundColor = [UIColor greenColor];
        _view.hidden = YES;
        [self.contentView addSubview:_view];
    }
    return self;
}

-(void)setModel:(CatogryMainTableModel *)model
{
    _model = model;
    _titleLabel.text = model.name;
    if (model.isselect)
    {
        _view.hidden = NO;
    }
    else
    {
        _view.hidden = YES;
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
